package org.stream.answerduel.vo.Message;

import com.alibaba.fastjson.JSON;
import lombok.Data;

/**
 * 功能描述：存储对战消息的实体类
 *
 * @Auther: 苏建誉
 * @Date: 2019/7/11 22:48
 */
@Data
public class AnswerMessage extends Message{
    /**
     * 这道题获得的分数
     */
    private int score;

    /**
     * 获得的总分累计
     */
    private int totalScore;
    /**
     * 作答时间
     */
    private int time;

    /**
     * 选择的选项
     */
    private int choice;

    public AnswerMessage(){
        super(Type.AnswerNotice);
    }
    public AnswerMessage(int score,int time){
        super(Type.AnswerNotice);
        this.score=score;
        this.time=time;
    }
    @Override
    public String toString(){
        return JSON.toJSONString(this);
    }
}
